import {get, post, upload} from '@/util/axios'

/**
 * 查询接口
 * @param params
 * @returns {Promise<unknown>}
 */
export function queryBook(params) {
    return get('/book/selectAllByPage', params)
}

/**
 * 查看详情
 * @param params
 * @returns {Promise<unknown>}
 */
export function queryBookDetail(params) {
    return get('/book/queryBookDetail' , params)
}

/**
 * 新增、修改接口
 * @param params
 * @returns {Promise<unknown>}
 */
export function saveOrUpdateBook(params) {
    return post('/book/saveOrUpdate', params)
}

/**
 * 删除接口
 * @param params
 * @returns {Promise<unknown>}
 */
export function deleteBook(params) {
    return post('/book/deleteBatch', params)
}

/**
 * 上传文件
 * @param params
 * @returns {Promise<unknown>}
 */
export function uploadFile(params) {
    return upload('/upload/uploadFile', params)
}
